<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{{.setting.webTitle}}</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link href="/public/front/mobile/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/public/front/mobile/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/front/mobile/js/slider.js"></script>
    <script type="text/javascript" src="/public/front/mobile/js/tab.js"></script>
</head>
<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed">
        <a href="javascript:;" class="aui-navBar-item" style="margin-right:0"  id="returngo">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center" style="margin-left:-30px">
            <span class="aui-center-title"><font>{{.data.setting.webTitle}}</font></span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i><font id="goHome">首页</font>&nbsp;&nbsp;|&nbsp;&nbsp;
            <i class="icon icon-sys"></i><font id="AddApply">加盟</font>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-free-box">
            <div class="aui-free-search">
                <i class="icon icon-search"></i>
                <form action="/search{{.setting.SearchType}}" method="get">
                    <input type="text" name='keyword' id="search" placeholder="请输入关键字" value="{{.keyword}}">
                </form>
            </div>
        </div>
        {{ yield }}
    </section>
</section>

</body>

<script type="text/javascript" src="/public/front/pc/search/js/jquery-1.8.3.min.js"></script>
<link href="/public/front/page/css/jquery.pagination.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/public/front/page/js/jquery.min.js"></script>
<script type="text/javascript" src="/public/front/page/js/jquery.pagination.min.js"></script>
<script type="text/javascript" >
    $(function () {
        $("#pagination").pagination({
            currentPage: {{.pages.current}},
            totalPage: {{.pages.pageNum}},
            isShow: true,
            count: 5,
            homePageText: "首页",
            endPageText: "尾页",
            prevPageText: "上一页",
            nextPageText: "下一页",
            callback: function(current) {
                window.location = "/search{{.SearchType}}?keyword={{.keyword}}&page="+current
            }
        });
    });
</script>
<SCRIPT>
    $(function () {
        $('#AddApply').click(function () {
            window.location = "/apply"
        });
        $('#goHome').click(function () {
            window.history.back();
        });
        $('#returngo').click(function () {
            window.history.back();
        });
        $(document).keypress(function(event){
            var keycode = (event.keyCode ? event.keyCode : event.which);
            if(keycode == '13'){
                if($('#search').val() == '' || $('#search').val() == '请输入关键字'){
                    alert("请输入搜索内容！")
                    return false;
                }else{
                    $('form').submit()
                }
            }
        });
    });

</SCRIPT>
</html>
